﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Peking_Duck
{
    public partial class Form1 : Form
    {
       
        public Form1()
        {
            InitializeComponent();
          
        }

        private void lblUsername_Click(object sender, EventArgs e)
        {

        }
        public void SaveSettings()
        {
            XMLParser Parser = new XMLParser();
            Parser.WriteXML(textboxHost.Text, textboxPort.Text, textboxUsername.Text, mtextboxPassword.Text, textboxCharacter.Text, textboxWorld.Text);
        }
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (checkboxRemember.Checked == true)
            {
                SaveSettings();
            }
         //   NPCGenerator Creature = new NPCGenerator();
           // Creature.Show();
        }

        private void checkboxRemember_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void btnCreature_Click(object sender, EventArgs e)
        {
            NPCGenerator Creature = new NPCGenerator();
            Creature.Show();
        }

        private void splitContainerA_Panel2_Paint(object sender, PaintEventArgs e)
        {

        }

        private void textboxWorld_TextChanged(object sender, EventArgs e)
        {
            SaveSettings();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            SaveSettings();
        }
    }
}
